﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IceDog.DNL.CSharp.DesignPattern.AbstractFactoryPattern.WorldThings
{
    public enum FactoryType
    {
        Color,
        Shape
    }

    public class FactoryProvider
    {
        public static WorldThingsFactory GetFactory(FactoryType type)
        {
            switch (type)
            {
                case FactoryType.Color:
                    return new ColorFactory();
                case FactoryType.Shape:
                    return new ShapeFactory();
                default:
                    return null;
            }
        }
    }
}
